home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-15 | 14.6 KB | 350 lines | [TEXT/EDIT] |
- Edit II Version 1.2.4 September 14, 1991
- ~~~~~~~~~~~~~~~~~~~~~
- Written by Kenneth Seah
- Copyright © 1990, 1991 by Kenneth Seah
- (Portions © by Symantec - Written using Think C and Capps’ Editor Toolkit)
-
- This application is copyrighted by Kenneth Seah and is distributed as shareware.
- You are welcome to try out Edit II for a week or two and if you decide that it's
- something you want to use, send a check drawn on a US Bank or a draft for US$15
- made out to me at the address below, enclosing the little questionaire. I'll
- answer your problems and consider bug fixes via electronic mail (InterNet, America
- OnLine or GEnie) if you are registered.
-
- Otherwise, give a copy of it to a friend, enclosing this file too and trash your
- copy (since it takes up valuable space on your disk).
-
- I'll consider that you have been registered once you have sent in your shareware
- fee. Upgrades will be posted to America OnLine, GEnie and InterNet. I can work
- out a 'site licence' fee if you need several copies installed at your place.
-
- For commercial distribution and correspondence, please contact:
-
- Kenneth Seah
- P O Box 8565
- Austin, TX 78713-8565
-
- GEnie: K.SEAH
-
- 0. Introduction
- ~~~~~~~~~~~~~~~
- Edit II is intended as a replacement for the Consulair Edit text editor but
- which alllows the use of the cursor keys on the Mac keyboard for navigation.
- If the extended keyboard is used, then the num lock LED will indicate whether
- the cursor pad or the numeric pad mode is on. The home, end, page up, page
- down keys will also work, as will the delete right key. One level of undo
- is supported. You can launch Edit II by double clicking old Edit files
- (since Edit II uses the same creator signature as Edit, that is, EDIT).
- This means that you might want to rebuild the desktop after installing
- Edit II.
-
- Edit II requires System Software 4.1 and above and is Multifinder-friendly.
-
- This program is compiled using Think C 4.0.5 and uses the Capps’ Editor
- Toolkit.
-
- 1. Menu Items
- ~~~~~~~~~~~~~
- Edit II works just like Consulair's Edit. The File menu is standard and carries
- the usual options of New, Open, Save, Save As, Revert, Page Setup, Print, Transfer
- and Quit. The Edit Menu is also standard and comes with the Undo, Cut, Copy, Paste
- and Clear choices. You can also shift a selection one space to the left or right
- using the shift left/right menu items The Search menu looks a lot like that in
- Think Pascal or C. The Find dialog allows for searching in multiple files.
- Click on the multiple file checkbox and specify the file paths or click on the
- Use File button to specify the folder using the good old File Selection box).
- Quick movements to any part of the file are handled by the Go to options in the
- Search menu. The Font and Size selection is made off the Options menu as submenus.
- Options also allows setting of tabs, autoindent choice and the creator of the
- saved file (defaults to EDIT). The Windows menu allows quick selection of one
- of the four windows available to Edit II (sorry but this is the maximum number
- of editable windows so far).
-
- The Balance item on the Edit menu will expand the selection to encompass the
- next enclosing set of parentheses (), braces {} or brackets []. The Remove LFs
- command will remove all linefeeds even if Strip LF or SmartStrip have not been
- selected. Select All will select all the text in the current window.
-
- 2. Nice things
- ~~~~~~~~~~~~~~
- Cursor keys on the Plus and up now work (unlike in Edit). In addition, if you
- have an extended keyboard, then the page up/down, home/end and delete to right
- (del) keys also work. Moreover, the keypad also toggles from the num lock mode
- (default) to cursor mode (like on the other machines) when you hit the num lock
- (clear) key on the keypad. A special CursorPad menu will appear showing the
- correspondence between the cursor pad and the keys on the number pad.
-
- Hitting 'enter' on the keypad will automatically scroll to the current insertion
- point.
-
- Hitting '-' on the keypad will jump around the five last insertion points. Note
- that double-clicking to select a word counts as two insertion points (a quirk of
- Capps’) and that Edit II will cycle through all five points, even though they are
- the same (like at the beginning). So if the insertion point seems stuck, keep on
- pressing '-'! These jump positions are changed when text is inserted, the page,
- home and end keys are pressed.
-
- The F1-F4 keys also function as undo, cut, copy and paste on the extended keyboard
- and the num lock light on the keyboard will show the state of the number pad.
-
- If autoindent mode is on, then hitting option-return will move the insertion
- point to the start of the next line and not do the autoindent for that line.
-
- SmartStrip is an intelligent linefeed remover in which linefeeds are removed
- when the file is read and replaced (after each CR or replacing each CR - depending
- on the input format) when the file is written back.
-
- Strip LF invokes a linefeed removal when the file is opened (substituting CRs
- for linefeeds or CR/LF combinations where appropriate).
-
- Either one or the other but not both of SmartStrip and Strip LF can be active.
- If neither of the modes is on then files are read in and written out without
- any removals or additions of linefeeds.
-
- The New Untitled item in the Options menu selects the optional opening of an
- Untitled window when Edit II is double-clicked.
-
- The Print Headers item in the Options menu chooses whether the headers are printed
- on the top of every page.
-
- Holding the option key when Edit II is starting up will bring up the Standard
- File input box for you to select the name of a file to edit.
-
- If you want to enter the tab or return characters in the Find dialog box,
- key in command-tab and command-return respectively.
-
- If MultiFinder is running then the right hand side of the window is moved in
- to show the disk drive and trash icons (like MS Word). Also the 'MF' after
- the version number simply indicates that MultiFinder is running.
-
- 3. GREP searching and replacement
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- GREP searching can be now done using regular expressions like the Unix GREP tool.
- Pattern matching of regular expressions is carried out as follows:
-
- Patterns (regular expressions)
-
- 1. Any non-special character is a regular expression which matches itself.
- Characters [ ] \ and . are special characters and should be
- preceded by \ (see rule 4).
-
- 2. A regular expression can be concatenated with another regular expression.
-
- 3. The . (period) is a special character which matches any one character.
-
- 4. The \ followed by any character except ( ) < > or one of the digits 1-9
- is a regular expression which matches that character.
-
- 5. A string of characters s surrounded by brackets [ ] forms a regular
- expression that exactly matches any one of the characters in s. The
- regular expression [^ß] matches any character not in the string ß.
- If a string of 3 characters a-b occurs in the string, then this represents
- all the characters from a to b inclusive.
-
- 6. A regular expression R followed by * forms a regular expression which matches
- zero or more occurences of R.
-
- 7. A regular expression surrounded by \( and \) matches whatever the regular
- expression matches.
-
- 8. A \ followed by a digit n 1 to 9 is a regular expression which matches
- whatever the nth subexpression surrounded by \( \) matches.
-
- 9. A regular expression surrounded by \< and \> constrains the match to
- occur when the regular expression is immediately preceded and followed
- by characters which do not match [A-Za-z0-9_] and the first and last
- characters match [A-Za-z0-9_]. This allows us to look for "words".
-
- 10. A regular expression which starts with ^ anchors the search pattern to
- the start of a line. The ^ appearing anywhere else in the regular
- expression will match the ^.
-
- 11. A regular expression ending in $ will anchor the search pattern to the
- end of a line. The $ appearing anywhere else in the regular
- expression will match the $.
-
- Replacements
-
- 1. Each occurence of & in the replacement string will be substituted with
- whatever was last matched by the regular expression.
-
- 2. Each occurence of the form \n where n is a digit 1 to 9 will substitute
- whatever was matched by the nth subexpression enclosed in \( and \).
-
- 3. Each occurence of the form \p where p is not a digit 1 to 9 will
- substitute that character p.
-
- 4. Multiple File Searching
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
- Clicking on the Multi-File Search checkbox in the Find dialog box will bring
- up another dialog box in which you can key in path names in which to search
- for files. A path name is formed by listing the folders separated by colons,
- starting with the volume name, such as HD20:Correspondence:MyMail:*. The * and
- ? symbols can be used (like in Unix) to match wildcard strings and single
- characters. To enter several search paths, key in command-return after each one.
- The Use File button in the Multi-File path specification dialog allows you to
- keep a list of pathnames in a file (with the suffix .PATHS) for easy usage.
- The names of the files in the path are not case sensitive.
-
- 5. Creator names
- ~~~~~~~~~~~~~~~~
- EDIT: Consulair Edit (and Edit II)
- MPS : Apple MPW
- KAHL: Think C
- PJMM: Think Pascal
- ALFA: Alpha
- MACA: MacWrite
- MSWD: Microsoft Word
- nX^n: WriteNow
- ttxt: TeachText
- PEDT: DA Edit or PEdit
- WNGZ: WingZ
-
- Additional creator names can be inserted into the Creator menu by using ResEdit
- (use at your own risk!!). Note that exactly FOUR letters must be keyed in for
- each creator name.
-
- 6. Workarounds
- ~~~~~~~~~~~~~~
- Edit II can only search for a pattern in a forward direction. If you want to
- search backwards, the best workaround is to go back to the start of the file
- (home) and then search.
-
- All files are edited in memory. So if you have a large file, reset the size of
- the application using Get Info on the Edit II application icon and change the
- size of the application memory. Or better still - run under the Finder (and not
- MultiFinder). Naturally you shouldn't edit a 2MB file on a 1MB Mac using
- Edit II!
-
- 7. Bug Reports
- ~~~~~~~~~~~~~~
- If you find any bugs with this program, please write to me at the above address.
- You can also E-mail me on GEnie as K.SEAH or on America OnLine as KSeah.
-
- 8. Warranty
- ~~~~~~~~~~~
- Kenneth Seah hereby disclaims all warranties relating to this software, whether
- express or implied, including without limitation any implied warranties of
- merchantability or fitness for a particular purpose. Kenneth Seah will not be
- liable for any special, incidental, consequential, indirect or similar damages
- due to loss of data or any other reason, even if Kenneth Seah or an agent of his
- has been advised of the possibility of such damages. In no event shall Kenneth
- Seah's liability for any damages ever exceed the price paid for the license
- to use software, regardless of the form of the claim. The person using the
- software bears all risk as to the quality and performance of the software.
-
- 9. Questionaire
- ~~~~~~~~~~~~~~~
- Copy, print this and fill in the blanks!
-
- REGISTERING FOR: Edit II Version 1.2.4 September 14, 1991
-
- NAME:
-
- ADDRESS:
-
-
-
- CITY: STATE: ZIP:
-
- ELECTRONIC MAIL ADDRESSES (GEnie, InterNet, Compu$erve, AppleLink, America OnLine):
- [For updates and bug reports]
-
-
- Macintosh you have:
-
- Current version of your System Software:
-
- Comments about Edit II (add more space if desired!):
-
-
-
-
-
-
-
- >>> Don't forget the US$15 shareware fee <<<
-
- Version History
- ~~~~~~~~~~~~~~~
- 1.0.1 (10/09/90)
- ~~~~~
- First release.
-
- 1.0.2 (11/20/90)
- ~~~~~
- • Now recognizes the extended keyboard del, home, end, pgup and pgdn keys
- while in the Cursor Pad mode.
- • Fixed toggling of LEDs.
- • Added Enter Selection menu item in Search menu to allow for copying of
- the selected text into the Search String box in the Find dialog (a la Think C).
- You can enter the selected text and then use Find Again to look for
- its next occurence.
-
- 1.1 (04/05/91)
- ~~~
- • EditPrefs file in the Preferences folder of the System Folder now contains the
- setup of the options, font, size and creator which were saved last. Default
- settings are: the following options are enabled (Auto Indent and SmartStrip),
- font is Monaco, size is 9 and creator is EDIT. Preferences file is not created
- if System Folder is on a locked disk (e.g. network server or locked local disk).
- • Balance command added to Edit menu to balance parentheses, braces and
- brackets.
- • Remove LFs command added to Edit menu to remove all linefeeds from window,
- if Strip LF or SmartStrip are not selected.
- • Select All added to Edit menu.
- *** Bugs fixed ***
- • Typing the letter ‘O’ while in CursorPad mode would cause a cursor down
- operation in 1.0.2.
- • If Caps Lock key is down (and the Caps Lock LED is on) then hitting
- num lock to set CursorPad mode would turn off the Caps Lock LED.
- • NumLock LED would stay on when printing from the Finder.
- • ID=12 Bomb eliminated on quit from Edit II, due to calling non-existent ADB
- routines on Mac Plusses and below.
- (Operational tweak: removed Think's ANSI library to save a lot of space!)
-
- 1.2 (05/04/91)
- ~~~
- • EditPrefs file now includes a flag for New Untitled to optionally open a new
- untitled window on startup. Default is to open the Untitled window.
- *** Bugs fixed ***
- • Selecting Quit from File menu and then selecting Cancel from the 'Save changes
- before quitting?' dialog would quit to the Finder anyway.
- • Now saves ETAB and EFNT information (tab/space and font/size resources) to the
- file if this is changed during edit.
-
- 1.2.1 (05/16/91) Maintenance release.
- ~~~~~
- *** Bugs fixed ***
- • Cursor updating now done via MultiFinder 'cursor moved' event rather than
- everytime through the main event loop (cosmetic 'bug' since I noticed that the
- cursor would 'stick' to the arrow when moving very rapidly from the scroll bar
- to the editing window).
- • Clipboard contents are updated when the program is quit.
-
- 1.2.2 (05/17/91) Maintenance release.
- ~~~~~
- *** Bugs fixed ***
- • Existing clipboard contents are read in when the program starts.
-
- 1.2.3 (08/24/91)
- ~~~~~
- • EditPrefs file now contains print headers flag, number of spaces per tab.
- • Close now has cmd-W as the command key. Consequently, Replace is now cmd-R,
- Replace and Find Again is cmd-Y, Page Setup is cmd-; and Print is cmd-P.
- • Print headers on each page is now optional.
- • Number of spaces per tab is now a global value and can be saved as a preference.
- This means that Set Tabs... will affect all future new windows and can be saved
- into the EditPrefs file.
- • The '-' key on the keypad now acts as a jump to previous insertion points (last 5).
- *** Bugs fixed ***
- • File list under Windows updates when an Untitled window is saved and when a
- window is Saved As another name.
-
- 1.2.4 (09/14/91) Maintenance Release
- ~~~~~
- *** Bugs fixed ***
- • GetEditPrefs: IOError=-39 when trying to read pre-1.2.3 EditPrefs file (file
- size different)
- • Does not crash under UniFinder, now uses WaitNextEvent exclusively.
-